<?php


namespace app\api\controller;

/**
 * 功能说明: 菜单管理
 * Company:物联网应用专家---成都亿佰特电子科技有限公司
 * User: 郑文军
 * Time: 2021-09-30 14:42
 * version：1.0
 */

class Menu extends Base
{
    /**
     * 功能说明 返回左侧菜单栏目
     * author 郑
     * time 2021-05-07 9:12
     */
    public function getMenu()
    {
        $data = [
            [
                'label' => '数据传输测试',
                'path' => 'wel',
                'component' => 'views/device/wel',
                'icon' => 'icon-caidan',
                'meta' => [
                    'i18n' => 'dashboard',
                    'keepAlive' => false,
                ],
            ],
            [
                'id' => 8,
                'label' => '设备管理',
                'path' => '/device',
                'icon' => 'icon-caidan',
                'meta' => [
                    'i18n' => 'DeviceManagement',
                    'keepAlive' => true,
                ],
                'children' => [
                    [
                        'id' => 10,
                        'label' => '设备列表',
                        'path' => 'index',
                        'component' => 'views/device/index',
                        'icon' => 'icon-caidan',
                        'meta' => [
                            'i18n' => 'DeviceList',
                            'keepAlive' => true,
                        ],
                    ],
                    [
                        'id' => 11,
                        'label' => '分组列表',
                        'path' => 'list',
                        'icon' => 'icon-caidan',
                        'component' => 'views/device/list',
                        'meta' => [
                            'i18n' => 'GroupList',
                            'keepAlive' => false,
                        ],
                    ],

                    [
                        'id' => 20,
                        'label' => '设备详情',
                        'path' => 'detail',
                        'icon' => 'icon-caidan',
                        'component' => 'views/device/detail',
                        'meta' => [
                            'i18n' => 'device_details',
                            'keepAlive' => false,
                        ],
                    ],
                    [
                        'id' => 21,
                        'label' => '设备控制',
                        'path' => 'control',
                        'icon' => 'icon-caidan',
                        'component' => 'views/device/control',
                        'meta' => [
                            'i18n' => 'control',
                            'keepAlive' => false,
                        ],
                    ],

                    [
                        'id' => 22,
                        'label' => '设备配置',
                        'path' => 'setting',
                        'icon' => 'icon-caidan',
                        'component' => 'views/device/setting',
                        'meta' => [
                            'i18n' => 'control',
                            'keepAlive' => false,
                        ],
                    ],
                    [
                    'id' => 13,
                    'label' => '数据收发测试',
                    'path' => 'test',
                    'icon' => 'icon-caidan',
                    'component' => 'views/device/test',
                    'meta' => [
                        'i18n' => 'DataTransceiver',
                        'keepAlive' => false,
                    ],

                ]
                    ]
            ],
        ];
        suc($data);
    }

    /**
     * 功能说明 获取顶部菜单栏目
     * author 郑
     * time 2021-05-07 9:12
     */
    public function getTopMenu(){
        suc("1");
    }
}